package immutablecollections.functions;

class Function4Impl<O> implements Function4<O>
{
    final private Invoker<O> invoker;

    public Function4Impl(Invoker<O> invoker)
    {
        this.invoker = invoker;
    }

    @Override
    public Function3<O> invoke(Object arg)
    {
        return new Function3Impl<O>(new DelegateInvoker<O>(invoker, arg));
    }

    @Override
    public String toString()
    {
        return invoker.toString();
    }
}
